Elementary matrices

Lecture 8

Minjae Park

Auburn University
MATH 2660 - Spring 2026

January 26, 2026

Announcement

  • Bonus Assignment 1 (worth up to 2%) has been posted and is due April 24, 2026 at 11:59 PM.
    This is a reading assignment, so please plan ahead if you intend to complete it.
  • Quiz 1 will be held in class this Friday via WebAssign. Please bring and test an electronic device in advance. The quiz covers material up through today’s lecture.
  • Next class will be a review session for Quiz 1, during which I will outline key topics and work through sample questions.

Attendance

Scan the QR code or go to join.iclicker.com/MBNJ.

Recap

Inverse matrix

  • Let \(A:\mathbb{R}^n \to \mathbb{R}^n\) be a linear transformation, or equivalently an \(n\times n\) matrix.
  • If another linear transformation \(B:\mathbb{R}^n \to \mathbb{R}^n\) undoes what \(A\) does (and vice versa), then \[AB=BA=I_n,\] where \(I_n\) is the \(n\times n\) identity matrix.
  • If such a matrix \(B\) exists, it is unique, and \(A\) is called invertible.
  • The matrix \(B\) is called the inverse matrix of \(A\), denoted by \(A^{-1}\).

Example 1

  • Verify that \[A=\begin{bmatrix}1&2\\3&2\end{bmatrix},\qquad B=\begin{bmatrix}-\frac12&\frac12\\[4pt]\frac34&-\frac14\end{bmatrix}\] satisfy \(AB=BA=I_2\), so \(B\) is the inverse of \(A\).
  • You may check either \(AB=I_2\) or \(BA=I_2\).
  • Fact: if \(AB=I_n\), then automatically \(BA=I_n\).

Visualize the example

  • Try to understand this example geometrically using the
    visualization of linear transformations.
  • Work through your own examples to solidify your understanding of linear transformations in the plane.

Example 2

  • Solve the system \[\begin{cases} x+2y=a\\ 3x+2y=b \end{cases}\] using Gauss–Jordan elimination.
  • Write the augmented matrix: \[\left[\begin{array}{cc|c} 1 & 2 & a\\ 3 & 2 & b \end{array}\right].\]
  • Eliminate \(x\) from the second row: \[\xrightarrow{R_2 \leftarrow R_2-3R_1} \left[\begin{array}{cc|c} 1 & 2 & a\\ 0 & -4 & b-3a \end{array}\right].\]
  • Scale the second row so the leading entry becomes \(1\): \[\xrightarrow{R_2 \leftarrow -\frac14 R_2} \left[\begin{array}{cc|c} 1 & 2 & a\\ 0 & 1 & \frac{3a-b}{4} \end{array}\right].\]
  • Eliminate \(y\) from the first row: \[\xrightarrow{R_1 \leftarrow R_1-2R_2} \left[\begin{array}{cc|c} 1 & 0 & \frac{b-a}{2}\\ 0 & 1 & \frac{3a-b}{4} \end{array}\right].\]
  • The reduced row-echelon form is \[\left[\begin{array}{cc|c} 1 & 0 & \frac{b-a}{2}\\ 0 & 1 & \frac{3a-b}{4} \end{array}\right].\]
  • Therefore, \[x=\frac{b-a}{2},\qquad y=\frac{3a-b}{4}.\]

Solution from the inverse

  • We can solve the same system \([A \mid \vec{b}]\) using the inverse matrix: \[\vec{x}=A^{-1}\vec{b},\qquad A=\begin{bmatrix}1&2\\3&2\end{bmatrix}.\]
  • From the earlier example (or using the formula), we found that \[A^{-1} =\begin{bmatrix}-\tfrac12&\tfrac12\\[2pt]\tfrac34&-\tfrac14\end{bmatrix}.\]
  • Therefore, \[\vec{x}=A^{-1}\vec{b} =\begin{bmatrix}-\tfrac12&\tfrac12\\[2pt]\tfrac34&-\tfrac14\end{bmatrix} \begin{bmatrix}a\\ b\end{bmatrix} =\begin{bmatrix}\frac{b-a}{2}\\[4pt]\frac{3a-b}{4}\end{bmatrix}.\]

Elementary matrices

Gauss–Jordan elimination and inverses

  • During Gauss–Jordan elimination, we track how the coefficient matrix \(A\) changes.
  • At each step, we apply an elementary row operation, which modifies the matrix in a simple and controlled way.
  • If \(A\) is invertible, this process eventually transforms \(A\) into the identity matrix \(I_n\).
  • In this sense, the sequence of elementary row operations collectively performs the same transformation by the inverse matrix \(A^{-1}\).
  • Therefore, to understand the inverse, we analyze how each elementary row operation acts on \(A\) and how these effects accumulate.

Row exchange

  • Swapping the \(i\)-th and \(j\)-th rows corresponds to swapping the \(i\)-th and \(j\)-th coordinate directions.
  • This operation is represented by multiplying an elementary matrix \[E_{R_i\leftrightarrow R_j} =[\vec{e}_1\ \cdots\ \vec{e}_j\ \cdots\ \vec{e}_i\ \cdots\ \vec{e}_n],\] where the \(i\)-th and \(j\)-th columns are exchanged.
  • For \(n=2\), explicitly, \(E_{R_1\leftrightarrow R_2} =\begin{bmatrix}0&1\\1&0\end{bmatrix}.\)
  • To undo this operation, we should swap the same two rows again. Therefore, \[E^{-1}_{R_i\leftrightarrow R_j}=E_{R_i\leftrightarrow R_j}.\]

Row scaling

  • Scaling the \(i\)-th row by a nonzero constant \(c\) corresponds to scaling the \(i\)-th coordinate direction by \(c\).
  • This operation is represented by another elementary matrix \[E_{R_i\leftarrow cR_i} =[\vec{e}_1\ \cdots\ c\vec{e}_i\ \cdots\ \vec{e}_n].\]
  • For \(n=2\), explicitly, \[E_{R_1\leftarrow cR_1} =\begin{bmatrix}c&0\\0&1\end{bmatrix},\quad E_{R_2\leftarrow cR_2} =\begin{bmatrix}1&0\\0&c\end{bmatrix}.\]
  • To undo the operation, we should scale the same row by \(\frac{1}{c}\). Therefore, \[E^{-1}_{R_i\leftarrow cR_i} =E_{R_i\leftarrow \frac{1}{c}R_i}.\]

Row addition

  • Replacing the \(i\)-th row by \(R_i+kR_j\) adds \(k\) times the \(j\)-th coordinate direction to the \(i\)-th.
  • This operation is represented by another elementary matrix \[E_{R_i\leftarrow R_i+kR_j} =[\vec{e}_1\ \cdots\ (\vec{e}_i+k\vec{e}_j)\ \cdots\ \vec{e}_n].\]
  • For \(n=2\) and the operation \(R_1\leftarrow R_1+kR_2\), \[E_{R_1\leftarrow R_1+kR_2} =\begin{bmatrix}1&k\\0&1\end{bmatrix}.\]
  • To undo the operation, subtract \(kR_j\): \[E^{-1}_{R_i\leftarrow R_i+kR_j} =E_{R_i\leftarrow R_i-kR_j}.\]

Example 3

  • Identify elementary matrices and their inverses.

\[ \begin{bmatrix} 0&0&1&0\\ 0&1&0&0\\ 1&0&0&0\\ 0&0&0&1 \end{bmatrix} \qquad \begin{bmatrix} 1&0&-3\\ 0&1&0\\ 0&0&1 \end{bmatrix}\] \[\begin{bmatrix} 1&0&0\\ 0&3&0\\ 0&0&2 \end{bmatrix} \qquad \begin{bmatrix} 1&0&0&0\\ 0&1&0&0\\ 0&0&1&0\\ 0&0&1&1 \end{bmatrix} \]

Gauss–Jordan elimination

  • Let \(A\) be an \(n\times n\) matrix.
  • If \(A\) is invertible, Gauss–Jordan elimination reduces \(A\) to \(I_n\) using elementary row operations.
  • Each row operation corresponds to left multiplication by an elementary matrix.
  • Thus, if \(E_i\) denotes the elementary matrix for \(i\)th step, \[E_kE_{k-1}\cdots E_1A=I_n.\]
  • Letting \(B=E_k\cdots E_1\), we obtain \(BA=I_n\), so \[B=A^{-1}.\]

Finding inverses from Gauss–Jordan elimination

  • This provides a systematic way to compute inverses.
  • Perform Gauss–Jordan elimination on \([A\mid I_n]\).
  • When the left side becomes \(I_n\), the right side becomes \(A^{-1}\); this is because \[B[A\mid I_n] = [BA \mid B].\]

Example 4

  • Find the inverse of \[A=\begin{bmatrix}1&2\\3&2\end{bmatrix}\] using Gauss–Jordan elimination.

  • Start with the augmented matrix \([A\mid I]\): \[\left[\begin{array}{cc|cc} 1 & 2 & 1 & 0\\ 3 & 2 & 0 & 1 \end{array}\right].\]

  • Eliminate the entry below the first pivot: \[\xrightarrow{R_2\leftarrow R_2-3R_1} \left[\begin{array}{cc|cc} 1 & 2 & 1 & 0\\ 0 & -4 & -3 & 1 \end{array}\right].\]

  • Scale the second row: \[\xrightarrow{R_2\leftarrow -\frac14 R_2} \left[\begin{array}{cc|cc} 1 & 2 & 1 & 0\\ 0 & 1 & \frac34 & -\frac14 \end{array}\right].\]

  • Eliminate the entry above the second pivot: \[\xrightarrow{R_1\leftarrow R_1-2R_2} \left[\begin{array}{cc|cc} 1 & 0 & -\frac12 & \frac12\\ 0 & 1 & \frac34 & -\frac14 \end{array}\right].\]

  • Therefore, \[A^{-1} =\begin{bmatrix} -\frac12 & \frac12\\[4pt] \frac34 & -\frac14 \end{bmatrix}.\]

Example 5